#
# Created By: Qilin.Ren 2018/06/01
#

add_executable(CybertronWork "")

include_directories("${CYBERTRON_PATH_FOUNDATION}/Source/CoreLibrary/include")
include_directories("${CYBERTRON_PATH_FOUNDATION}/Source/Worker/BaseLibrary/BridgeBase/include")
include_directories("${CYBERTRON_PATH_FOUNDATION}/Source/Worker/BaseLibrary/SensorBase/include")
include_directories("${CYBERTRON_PATH_FOUNDATION}/Source/Protocol/Output/cpp")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/artifactory/ffmpeg/include")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/asio")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/osi/osi3")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/SSD/include")


IF (WIN32)
	add_definitions(-D_WIN32_WINNT=0x0501)
ENDIF()

add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)

file(GLOB_RECURSE srcs *.h *.hh *i *.hpp *.c *.cc *.cpp)
target_sources(CybertronWork PRIVATE ${srcs})
source_group(Source FILES ${srcs})

SetDefaultTargetProperties(CybertronWork)

target_link_libraries(CybertronWork CybertronCore)

IF (MSVC)
target_link_libraries(CybertronWork protobuf)
ELSEIF (UNIX)
target_link_libraries(CybertronWork protobuf -luuid)
ENDIF()

IF (MSVC)
	SET_PROPERTY(TARGET CybertronWork PROPERTY FOLDER "Worker")
ENDIF()
